{:W('Template/top')}
<div class="wrapper clearfix content" style='border: 1px solid #ddd'>
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="{:U('Tour/index',array('id'=>I('get.id')))}">产品列表</a>&gt;新增路线&gt;基本信息</div>
        <div class="cTitle2">基本信息</div>

        <div role="tabpanel">
            <div class="nav ckAct">
                <span class="active"><a
                        href="<if condition='$aid eq 0'>{:U('Tour/add',array('id'=>I('get.id')))}<else/>{:U('Tour/add',array('id'=>I('get.id'),'tid'=>$aid))}</if>"
                        class="a-1"><i class="i-1"></i>基本信息</a></span>
                <span><a style="cursor: pointer" onclick="addPlan({$aid})" class="a-2"><i
                        class="i-2"></i>详细行程</a></span>
                <span><a
                        href=" <if condition='$aid eq 0'>{:U('Tour/addExtend',array('id'=>I('get.id')))}<else/>{:U('Tour/addExtend',array('id'=>I('get.id'),'tid'=>$aid))}</if>"
                        class="a-3"><i class="i-3"></i>扩展信息</a></span>
                <span><a style="cursor: pointer" onclick="addSku({$aid})" class="a-4"><i
                        class="i-4"></i>团期/位控</a></span>
                <input type="hidden" id="planadd" value="{:U('Tour/addPlan',array('id'=>I('get.id')))}"/>
                <input type="hidden" id="skuadd" value="{:U('Tour/addSku',array('id'=>I('get.id')))}"/>
                <input type="hidden" value="{:U('Tour/add',array('id'=>I('get.id')))}" id="addtourinfo"/>
            </div>
            <div class="tab-content">
                <div class="panelCon tab-pane active">
                    <table class="baseInfo-Tb table-hover">
                        <tr>
                            <th>供应商：</th>
                            <td class="p_name">{$info.name}</td>
                        </tr>
                        <tr>
                            <th>线路名称：</th>
                            <td>
                                <input type="text" name="name" class="form-control txt" id="linename"
                                       onblur="commonBlur('linename', 'test1Tip')" placeholder="{$info.addInfo.name}"
                                       value="{$info.addInfo.name}"/>
                                <span id="test1Tip" class="text-c4"></span>
                            </td>
                        </tr>
                        <tr>
                            <th>线路类型：</th>
                            <td id="line_type">
                                <label class="checkbox-inline">
                                    <input type="radio" value="1" id="line_type1" name="line_type"
                                    <if condition="$info['addInfo']['line_type'] eq 1">checked</if>
                                    />周边游
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="2" id="line_type2" name="line_type"
                                    <if condition="$info['addInfo']['line_type'] eq 2">checked</if>
                                    />国内游
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="3" id="line_type3" name="line_type"
                                    <if condition="$info['addInfo']['line_type'] eq 3">checked</if>
                                    />出境游
                                </label>
                                <span style="margin-left:40px;line-height: 25px;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th>出发地：</th>
                            <td>
                                <select name="departure" id="departure" class="form-control sel"
                                        onchange="departure('departure')">
                                    <volist name='province' id='v'>
                                        <option value="{$v.name}"
                                        <if condition="($info['addInfo']['departure']['0'] eq $v['name'])">selected</if>
                                        >{$v.name}</option>
                                    </volist>
                                </select>
                                <select name="departure1" id="departure1" class="form-control sel"
                                        onchange="departure1('departure1')">
                                    <empty name='cityName'>
                                        <option value="北京">北京</option>
                                    </empty>
                                    <notempty name='cityName'>
                                        <volist name='city' id='vv'>
                                            <option value="{$vv.name}"
                                            <if condition="($info['addInfo']['departure']['1'] eq $vv['name'])">
                                                selected
                                            </if>
                                            >{$vv.name}</option>
                                        </volist>
                                    </notempty>

                                </select>
                                <span class="text-c4" id="csnyTip"></span>
                            </td>
                        </tr>
                        <tr>
                            <th>授权区域：</th>
                            <td>
                                <select name="destination" id="destination" class="form-control sel"
                                        onchange="destination('destination')">
                                    <if condition="$num eq 1">
                                        <option value="{$destination.0}">{$destination.0}</option>
                                        <else/>
                                        <option value="0">请选择</option>
                                        <volist name="destination" id='v'>
                                            <option value="{$v}"
                                            <if condition="($info['addInfo']['destination'] eq $v)">selected</if>
                                            >{$v}</option>
                                        </volist>
                                    </if>
                                </select>
                                <span class="text-c4" id="csnyTips"></span>
                            </td>
                        </tr>
                        <tr>
                            <th>目的地：</th>
                            <td>
                                <input type="text" name="destinations" id="destinations" onblur="destinations()"
                                       class="form-control txt"
                                <if condition="$num eq 1">placeholder="{$destination.0}" value="{$destination.0}"
                                    <else/>
                                    placeholder="{$info.addInfo.destinations}" value="{$info.addInfo.destinations}"
                                </if>
                                />
                                <span class="text-c4" id="csnyTipss"></span>
                            </td>
                        </tr>
                        <tr>
                            <th>去程交通：</th>
                            <td id="traffic_go">
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_go" value="火车"
                                    <if condition="($info['addInfo']['traffic_go'] eq '火车')">checked</if>
                                    />火车
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="plane traffic_go" value="飞机"
                                    <if condition="($info['addInfo']['traffic_go'] eq '飞机')">checked</if>
                                    />飞机
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_go" value="轮船"
                                    <if condition="($info['addInfo']['traffic_go'] eq '轮船')">checked</if>
                                    />轮船
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_go" value="巴士"
                                    <if condition="($info['addInfo']['traffic_go'] eq '巴士')">checked</if>
                                    />巴士
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_go" value="其他"
                                    <if condition="($info['addInfo']['traffic_back'] eq '其他')">checked</if>
                                    />其他
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <th>返程交通：</th>
                            <td id="traffic_back">
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_back" value="火车"
                                    <if condition="($info['addInfo']['traffic_back'] eq '火车')">checked</if>
                                    />火车
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="plane traffic_back" value="飞机"
                                    <if condition="($info['addInfo']['traffic_back'] eq '飞机')">checked</if>
                                    />飞机
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_back" value="轮船"
                                    <if condition="($info['addInfo']['traffic_back'] eq '轮船')">checked</if>
                                    />轮船
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_back" value="巴士"
                                    <if condition="($info['addInfo']['traffic_back'] eq '巴士')">checked</if>
                                    />巴士
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" class="traffic_back" value="其他"
                                    <if condition="($info['addInfo']['traffic_back'] eq '其他')">checked</if>
                                    />其他
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <th>业务联系人：</th>
                            <td>
                                <input type="text" class="form-control txt"
                                       onblur="commonBlur('contact_person', 'contact_personTip')" id="contact_person"
                                       placeholder="{$userInfo.name}" value="{$userInfo.name}"/>
                                <span class="text-c4" id="contact_personTip"></span>
                            </td>
                        </tr>
                        <if condition="$userInfo['mobile'] neq ''">
                            <tr>
                                <th>业务联系电话：</th>
                                <td>
                                    <input type="text" name="contact_phone"
                                           onblur="commonBlur('contact_phone', 'contact_phoneTip')" id="contact_phone"
                                           class="form-control txt" placeholder="{$userInfo.mobile}"
                                           value="{$userInfo.mobile}"/>
                                    <span class="text-c4" id="contact_phoneTip"></span>
                                </td>
                            </tr>
                            <else/>
                            <tr>
                                <th>业务联系电话：</th>
                                <td>
                                    <input type="text" name="contact_phone"
                                           onblur="commonBlur('contact_phone', 'contact_phoneTip')" id="contact_phone"
                                           class="form-control txt" placeholder="{$info.addInfo.contact_phone}"
                                           value="{$info.addInfo.contact_phone}"/>
                                    <span class="text-c4" id="contact_phoneTip"></span>
                                </td>
                            </tr>
                        </if>
                        <tr>
                            <th>参团方式：</th>
                            <td id="travel_type">
                                <label class="checkbox-inline">
                                    <input type="radio" value="1" name="travel_type"
                                    <if condition="($info['addInfo']['travel_type'] eq 1)">checked</if>
                                    />散拼团
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="2" name="travel_type"
                                    <if condition="($info['addInfo']['travel_type'] eq 2)">checked</if>
                                    />自由行
                                </label>
                                <label class="checkbox-inline">
                                    <input type="radio" value="3" name="travel_type"
                                    <if condition="($info['addInfo']['travel_type'] eq 3)">checked</if>
                                    />当地游
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <th>产品图片：</th>
                            <td id="pics">
                                <div class="row" style="margin:10px;">
                                    <div class="col-sm-7">
                                        <h4 id="uploadMessage">当前共有 0 张图片</h4>
                                    </div>
                                    <div class="col-sm-5">
                                        <div id="filePicker"
                                             class="btn btn-sm btn-primary webuploader-container webuploader-picker">
                                            选择图片
                                        </div>
                                        <input id="btnUploadCtrl" type="button" class="btn btn-sm btn-primary"
                                               value="开始上传"/>
                                    </div>
                                </div>
                                <hr style="padding-bottom: 1px;"/>
                                <input type="hidden" id="cover-pic" value="{$info.cover_pic}"/>

                                <div class="container" style="max-width: 660px;" id="fileList">
                                    <volist name="info['imgs']" id="vo">
                                        <notempty name="vo['0']">
                                            <div id="" class="row upload-item" style="margin-bottom: 10px;"
                                                 path="{$vo.0}" isCover="{$vo.1}">
                                                <div class="col-sm-2"><img
                                                    <if condition="$vo['0'] eq $info['addInfo']['cover_pic']">
                                                        class="img-preview img-cover"
                                                        <else/>
                                                        class="img-preview"
                                                    </if>
                                                    alt="" src="{$vo.0|GetRealImageUrl}">
                                                </div>
                                                <div class="col-sm-8">
                                                    <textarea rows="3" class="form-control" placeholder="请输入图片描述">{$vo.2}</textarea>
                                                </div>
                                                <div class="col-sm-2">
                                                    <div class="dropdown">
                                                        <button data-toggle="dropdown" id="dropdownMenu1"
                                                                class="btn dropdown-toggle" type="button">
                                                            操作
                                                            <span class="caret"></span>
                                                        </button>
                                                        <ul aria-labelledby="dropdownMenu1" role="menu"
                                                            class="dropdown-menu">
                                                            <li role="presentation">
                                                                <a class="move-up" href="#" tabindex="-1"
                                                                   role="menuitem">上移</a>
                                                            </li>
                                                            <li role="presentation">
                                                                <a class="move-down" href="#" tabindex="-1"
                                                                   role="menuitem">下移</a>
                                                            </li>
                                                            <li role="presentation">
                                                                <a class="setCover" href="javascript:;" tabindex="-1"
                                                                   role="menuitem">设为封面</a>
                                                            </li>
                                                            <li role="presentation">
                                                                <a class="removeFile uploaded" href="javascript:;"
                                                                   tabindex="-1" role="menuitem">
                                                                    移除图片
                                                                </a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                    <div class="upload-msg"></div>
                                                </div>
                                            </div>
                                        </notempty>
                                    </volist>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>&nbsp;</th>
                            <td>
                                <button type="button" class="btn btn-warning pull-right" onclick="addTourInfo({$aid}, '{$aid|setEncrypt}')">
                                    保存
                                </button>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{:W('Template/bottom')}
<script type="text/javascript" src="__PUBLIC__/js/addtour.js?v=3"></script>
<script type="text/javascript" src="http://cdn.lydlr.com/public/webuploader-0.1.5/webuploader.js"></script>
<script type="text/javascript" src="http://cdn.lydlr.com/public/js/upload.js?v=1"></script>
</body>
</html>